package Good;

public class Good {
    String name;
    String ID;
    int price;
    int num;
    String type;
    String URL;
    public Good(String name, String ID, int price, int num, String type,String URL)
    {
        this.ID=ID;
        this.name=name;
        this.price=price;
        this.num=num;
        this.type=type;
        this.URL=URL;
    }
    public void setNum(int i)
    {
        this.num=i;
    }
    public String getID()
    {
        return ID;
    }
    public int getNum()
    {
        return num;
    }
    public String getURL()
    {
        return URL;
    }
    public int getPrice()
    {
        return price*num;
    }
    public String getName()
    {return name;}
    public int getprice()
    {
        return price;
    }
    public String toStr()
    {
        return this.name+"-"+this.ID+"-"+this.price+"-"+this.num+"-"+this.type+'-'+this.URL;
    }
}
